import React, { useState,useEffect } from 'react'
import { useSelector,useDispatch } from 'react-redux'
import { loadDataAsync } from '../actionCreater'

const useGetState = () => {
    const {list} = useSelector(state => state.personalInfo)
    let [ state,setState ] = useState(
        
    )

    const dispatch = useDispatch()

    useEffect(() => {
        dispatch(loadDataAsync())
    },[dispatch])

    return {
        state
    }
}

export default useGetState